﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PHTShop.admin
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "Index";
            if (!IsPostBack)
            {
                DataContextDataContext dc = new DataContextDataContext();
                LabelCategory.Text = dc.Categories.Where(z => z.status == true).Count().ToString();

                LabelProduct.Text = dc.Products.Where(z => z.status == true).Count().ToString();
                LabelPartner.Text = dc.Partners.Where(z => z.id > 0).Count().ToString();
                LabelUser.Text = dc.Accounts.Where(z => z.active == true).Count().ToString();
                LabelOrder.Text = dc.Orders.Where(z => z.status == false).Count().ToString() ;
    
                
            }
        }
    }
}